package com.hucsmn.phone;

/**
 * 用户消费信息测试类。
 */
public class BillTest extends Tester {
    private static final long GB = 1024L * 1024L * 1024L;

    public static void main(String[] args) {
        Bill bill = new Bill(1.0, 65536, 10.0);

        asserts(bill.getDuration() == 1.0);
        asserts(bill.getTraffic() == 65536);
        asserts(bill.getCost() == 10.0);

        bill.setDuration(2.5);
        bill.setTraffic(2 * GB);
        bill.setCost(50.0);

        asserts(bill.getDuration() == 2.5);
        asserts(bill.getTraffic() == 2 * GB);
        asserts(bill.getCost() == 50.0);
    }
}
